<template>
  <div>
    <ul>
      <li v-for="(sc,index) in scspdata" :key="index">
        <img :src="sc.img" />
        <p>{{ sc.text }}</p>
        <input type="button" value="删除" @click="del" />
      </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "Shipingshoucang",
  data() {
    return {
      scs: [],

    };
  },
  // created() {
  //   axios({
  //     url: "/scsp",
  //   }).then((res) => (this.scs = res.data));
  // },

created() {
    this.$store.dispatch("LINK_SCSP_DATA","/my/scsp")
    },
    computed:{
      scspdata(){
        return this.$store.state.MyScspM.scsp
      }
   },

  methods: {
    del() {
      axios({
        url: "/del",
        params: {
          "text": "烈火战士",
        },
      }).then((res) => (this.goodslist = res.data));
    },
  },
};
</script>

<style scoped>
ul {
  width: 100%;
  background-color: white;
}
li {
  display: flex;
  margin-bottom: 0.1rem;
}
li img {
  margin-left: 0.3rem;
  width: 1.2rem;
  height: 0.9rem;
}
li p {
  margin-left: 0.1rem;
  margin-top: 0.3rem;
  margin-right: 1rem;
}
</style>